from random import randint


def redbag(money, total, n):
    if n == 1:
        money.append(total)
    else:
        x = randint(1, total - n + 1)
        money.append(x)
        total -= x
        redbag(money, total, n-1)


money = []
redbag(money, 100, 10)
print(money)